public class ThreadDemo {
 public static void main(String[] args) {
 Thread thread = Thread.currentThread();
System.out.println(thread.getName());
 }
 }